#pragma once

#include <QString>
#include <QDateTime>

namespace MISystem
{
    class StockOperation
    {
    public:
        enum OpType { In, Out };

        StockOperation();
        StockOperation(int id, const QString& materialId, OpType type,
            int quantity, const QString& operatorName, const QDateTime& opTime);

        int getOperationId() const;
        QString getMaterialId() const;
        OpType getOperationType() const;
        QString getOperationTypeString() const;
        int getQuantity() const;
        QString getOperator() const;
        QDateTime getOperationTime() const;

        void setOperationType(OpType type);
        void setQuantity(int quantity);
        void setOperator(const QString& operatorName);

    private:
        int _operationId;
        QString _materialId;
        OpType _operationType;
        int _quantity;
        QString _operator;
        QDateTime _operationTime;
    };
}